using CommunityToolkit.Mvvm.ComponentModel;

namespace WinUITest.ViewModels
{
    /// <summary>
    /// 键值对视图模型
    /// </summary>
    public partial class KeyValueViewModel : KeyValueViewModel<string>
    {
    }
    /// <summary>
    /// 键值对视图模型
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public partial class KeyValueViewModel<T> : ObservableObject
    {
        /// <summary>
        /// 键
        /// </summary>
        [ObservableProperty]
        public partial T? Key { get; set; } = default;

        /// <summary>
        /// 值
        /// </summary>
        [ObservableProperty]
        public partial string Value { get; set; } = string.Empty;
    }
}
